import request from '@/utils/request'

// 查询住宿分配列表
export function listAccommodation(query) {
  return request({
    url: '/stuinfo/accommodation/list',
    method: 'get',
    params: query
  })
}

// 查询住宿分配详细
export function getAccommodation(accommodationId) {
  return request({
    url: '/stuinfo/accommodation/' + accommodationId,
    method: 'get'
  })
}

// 新增住宿分配
export function addAccommodation(data) {
  return request({
    url: '/stuinfo/accommodation',
    method: 'post',
    data: data
  })
}

// 修改住宿分配
export function updateAccommodation(data) {
  return request({
    url: '/stuinfo/accommodation',
    method: 'put',
    data: data
  })
}

// 删除住宿分配
export function delAccommodation(accommodationId) {
  return request({
    url: '/stuinfo/accommodation/' + accommodationId,
    method: 'delete'
  })
}
